package com.jindy.module.statementorder.service.impl;

import java.util.List;
import com.jindy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jindy.module.statementorder.mapper.StatementOrderMapper;
import com.jindy.module.statementorder.domain.StatementOrder;
import com.jindy.module.statementorder.service.IStatementOrderService;

/**
 * 对账单关联订单Service业务层处理
 * 
 * @author jindy
 * @date 2023-03-15
 */
@Service
public class StatementOrderServiceImpl implements IStatementOrderService 
{
    @Autowired
    private StatementOrderMapper statementOrderMapper;

    /**
     * 查询对账单关联订单
     * 
     * @param id 对账单关联订单主键
     * @return 对账单关联订单
     */
    @Override
    public StatementOrder selectStatementOrderById(Long id)
    {
        return statementOrderMapper.selectStatementOrderById(id);
    }

    /**
     * 查询对账单关联订单列表
     * 
     * @param statementOrder 对账单关联订单
     * @return 对账单关联订单
     */
    @Override
    public List<StatementOrder> selectStatementOrderList(StatementOrder statementOrder)
    {
        return statementOrderMapper.selectStatementOrderList(statementOrder);
    }

    /**
     * 新增对账单关联订单
     * 
     * @param statementOrder 对账单关联订单
     * @return 结果
     */
    @Override
    public int insertStatementOrder(StatementOrder statementOrder)
    {
        statementOrder.setCreateTime(DateUtils.getNowDate());
        return statementOrderMapper.insertStatementOrder(statementOrder);
    }

    /**
     * 修改对账单关联订单
     * 
     * @param statementOrder 对账单关联订单
     * @return 结果
     */
    @Override
    public int updateStatementOrder(StatementOrder statementOrder)
    {
        statementOrder.setUpdateTime(DateUtils.getNowDate());
        return statementOrderMapper.updateStatementOrder(statementOrder);
    }

    /**
     * 批量删除对账单关联订单
     * 
     * @param ids 需要删除的对账单关联订单主键
     * @return 结果
     */
    @Override
    public int deleteStatementOrderByIds(Long[] ids)
    {
        return statementOrderMapper.deleteStatementOrderByIds(ids);
    }

    /**
     * 删除对账单关联订单信息
     * 
     * @param id 对账单关联订单主键
     * @return 结果
     */
    @Override
    public int deleteStatementOrderById(Long id)
    {
        return statementOrderMapper.deleteStatementOrderById(id);
    }
}
